using System.Runtime.Serialization;

namespace MiniStock.Entities.Stock.Events.Customer
{
    [DataContract]
    public class ChangeHQAddressEvent : AddressChangeEvent
    {
        public override void ApplyTo(Common.EntityBase entity)
        {
            base.ApplyTo(entity);
            ((Stock.Customer) entity).HQAddress = new Address()
                                                      {
                                                          City = this.City,
                                                          State = this.State,
                                                          StreetName = this.StreetName,
                                                          StreetNumber = this.StreetNumber,
                                                      };
        }
    }
}